/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package view;

import database.SuratTabel;
import java.awt.BorderLayout;
import java.util.ArrayList;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTable;
import model.Surat;

/**
 *
 * @author Adell
 */
public class PanelCekSurat extends JPanel {

    private JTable tabelSurat;
    private JLabel labelsurat;
    private ArrayList<Surat> data;

    public PanelCekSurat(ArrayList<Surat> data) {
        this.data = data;

        setLayout(new BorderLayout());
        labelsurat = new JLabel("Label Surat");
        labelsurat.setHorizontalAlignment(JLabel.CENTER);
        add(labelsurat, BorderLayout.NORTH);

        tabelSurat = new JTable();
        tabelSurat.setModel(new SuratTabel(data));
        add(tabelSurat, BorderLayout.CENTER);
        setVisible(true);

    }
}
